home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / demos / VisualAge for Java 2.0 Entry / setup / data1.cab / ide-e / IDE / cache / G75DK9 (.txt) < prev    next >
Encoding:
Java Class File  |  1998-09-16  |  909 b   |  18 lines

  1. package com.sun.java.swing.text;
  2.  
  3. import java.awt.event.ActionEvent;
  4.  
  5. public class DefaultEditorKit$CopyAction extends TextAction {
  6.    public DefaultEditorKit$CopyAction() {
  7.       super("copy-to-clipboard");
  8.    }
  9.  
  10.    public void actionPerformed(ActionEvent e) {
  11.       JTextComponent target = ((TextAction)this).getTextComponent(e);
  12.       if (target != null) {
  13.          target.copy();
  14.       }
  15.  
  16.    }
  17. }
  18.